/**
 * @file 入口文件
 * @author lishaohai
 */
import Vue from 'vue';
import App from '@/App.vue';
import router from '@/router';
import store from '@/store';
// import ElementUI from 'element-ui';
import 'animate.css';
import * as filtersObj from './filters';
import '@/assets/iconfont/iconfont.css';
import '@/plugins/element.js';
import '@/plugins/echarts';
import '@/styles/element-variables.scss';
import '@/assets/css/reset.css';
// import 'element-ui/lib/theme-chalk/index.css';
import '@/styles/index.scss';
// import './permission';

import LayoutWrap from '@/layout/LayoutWrap';
import TheDatePicker from '@/components/TheDatePicker';
import TextButton from '@/components/TextButton';
import Pagination from '@/components/Pagination';
import TheElDialog from '@/components/TheElDialog';
import TheElCol from '@/components/TheElCol';
import TheElDatePicker from '@/components/TheElDatePicker';

import './directive/useDirective';

Vue.config.productionTip = false;

Vue.component('LayoutWrap', LayoutWrap);
Vue.component('TheElDialog', TheElDialog);
Vue.component('Pagination', Pagination);
Vue.component('TheDatePicker', TheDatePicker);
Vue.component('TextButton', TextButton);
Vue.component('TheElCol', TheElCol);
Vue.component('TheElDatePicker', TheElDatePicker);

localStorage.removeItem('TOKEN'); // 删除用户用不到的token

// 注册全局过滤器
Object.keys(filtersObj).forEach(key => {
    Vue.filter(key, filtersObj[key]);
});

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');
